package org.cllib.tool;

import java.io.File;

public class SVNCleaner {
	private final static String DOTSVNDIRECTORY = ".svn";

	public static void main(String[] args) {
		for (String path : args) {
			File file = new File(path);
			clean(file);
		}
	}

	public static void clean(File file) {
		if (file.isDirectory()) {
			File[] files = file.listFiles();
			if (files != null && files.length > 0) {
				for (File f : files) {
					if (f.getName().equals(DOTSVNDIRECTORY)) {
						Util.rm(f);
					} else {
						clean(f);
					}
				}
			}
		}
	}
}
